﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript">

        var messageId;
        messageId = -1;

        //http://en.wikipedia.org/wiki/XMLHttpRequest
        if (typeof XMLHttpRequest == "undefined")
            XMLHttpRequest = function () {
                try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
                catch (e) { }
                try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
                catch (e) { }
                try { return new ActiveXObject("Microsoft.XMLHTTP"); }
                catch (e) { }
                //Microsoft.XMLHTTP points to Msxml2.XMLHTTP and is redundant
                throw new Error("This browser does not support XMLHttpRequest.");
            };

        function doing() {
            var xmlHttp = new XMLHttpRequest();

            xmlHttp.onreadystatechange = function () {
                if (xmlHttp.readyState == 4) {

                    var serial
                    var ppp = xmlHttp.responseText;

                    var buffer;
                    buffer = "";

                    try {
                        var jsObject = JSON.parse(ppp, function (key, value) { return value; });
                        var row;
                        for (row in jsObject) {

                            buffer += jsObject[row];
                            buffer += "\n";
                        }
                    }
                    catch (e) {
                        alert("response text " + e.Message);
                    }

                    document.getElementById("time").innerText = buffer;
                }
            }
            xmlHttp.open("GET", "json.aspx", true);
            xmlHttp.send(null);
        }

        function gettingTime() {
            setInterval(doing, 1000);
            doing();

        } 
    </script>
    <style type="text/css">
        .style1
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: medium;
        }
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
        }
    </style>
</head>
<body onload="gettingTime();">
    <form id="form1" runat="server">
    <div>
        <h1>
            C<span class="style2">ustomers report - this page refreshes automatically!</span></h1>
        <pre><span
            id="time" class="style1"></span></pre>
    </div>
    </form>
</body>
</html>
